package net.lijingye.education.service;

import net.lijingye.education.entity.*;
import net.lijingye.education.exception.*;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

/**
 * Created by LijingYe on 2016/3/31.
 */
@Service
public interface UserService {
    User getUserById(String userId) throws ObjectNotExistsException, DaoException;

    User getUserByAccessToken(String accessToken) throws ObjectNotExistsException, DaoException;

    Tweet addTweet(Date time, String content, User user) throws DaoException;

    Tweet addTweetFile(String tweetId, List<String> fileList) throws DaoException, ObjectNotExistsException;

    boolean isFriend(String userId1,String userId2) throws DaoException,ObjectNotExistsException;
    void deleteFriend(String userId1,String userId2) throws DaoException,ObjectNotExistsException,FriendshipNotExistsException;
    void editFriendRequest(User user,String friendRequestId,boolean accept) throws DaoException,FriendRequestNotExistsException;
    void addFriendRequest(User user,User target) throws DaoException,FriendRequestAlreadyExistsException;

    void updateUserProfile(User user, String name, String gender, String birthday, String telephone, Province province, City city, String hobbies, String motto, String email) throws DaoException,ProfileProvinceNotExistsException,ProfileCityNotExistsException;
}
